package com.linbei.linbei_movie.service.impl;

import com.linbei.linbei_movie.mapper.MovieMapper;
import com.linbei.linbei_movie.mapper.UserMapper;
import com.linbei.linbei_movie.pojo.User;
import com.linbei.linbei_movie.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserById(Long userId) {
        return userMapper.getUserById(userId);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public User login(User user) {
        return userMapper.login(user);
    }

    @Override
    public User getUserByUsername(String username) {
        return userMapper.getUserByUsername(username);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }
}
